package com.wtc.homework;

/**
 * @author 马可
 * @version 1.0
 * 编程题2
 * 2023/5/10
 * IntelliJ IDEA
 */
public class Homework03 {
    public static void main(String[] args) {
        new Cellphone().testWork(new Compute() {
            @Override
            public void work() {
                System.out.println("计算器正在工作！");
            }
        });
    }
}
interface Compute {
    void work();
}
class Cellphone {
    public void testWork(Compute compute) {
        compute.work();
    }
}
